package com.zxy.server;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Service;

/**
 * @author : zhangxuyuan
 * @Project: springbootrabbitmq
 * @Package com.zxy.server
 * @date Date : 2021年04月20日 22:10
 */
@Service
public class ExpireOrderConsumer {

    @RabbitListener(queues = "dlx")
    public void expireOrder(@Payload Integer orderId)
    {
        OrderServer.expire(orderId);
    }
}
